import { useModel } from 'umi';

/**
 * 设置整个layout的loading
 */
export default function useLayoutLoading() {
  const { layoutLoading, setLayoutLoading } = useModel(
    'global',
    ({ layoutLoading, setLayoutLoading }) => ({
      layoutLoading,
      setLayoutLoading,
    }),
  );
  return {
    layoutLoading,
    setLayoutLoading,
  };
}
